package com.education.springbootdemo.mail;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.io.Serializable;

// @Component @Service
@Configuration
@Data
@PropertySource(value = {
        "classpath:email-${spring.profiles.active}.properties"
},ignoreResourceNotFound = true)
public class MyEmail implements Serializable {

    @Value("${email.user}")
    private String user; //发件人的邮箱

    @Value("${email.code}")
    private String code; // 邮箱授权码

    @Value("${email.host}")
    private String host; // 服务器域名

    @Value("${email.auth}")
    private boolean auth;

    @Value("${email.sslenable}")// 身份验证
    private boolean sslenable; // ssl开关

}
